package com.xilin.kotlincoroutine.repository

import com.xilin.kotlincoroutine.bean.User
import kotlinx.coroutines.delay

class UserRepository {

    suspend fun getUser(name: String): User {
        //应该启动协程请求后台获取数据
        delay(1000)
        return User("hello $name")
    }
}